package cn.edu.hunau.java.week02.day04;

import org.junit.Test;

public class InterfaceTest {
    @Test
    public void test(){
        Soo soo=new Soo.SooImpl();
        System.out.println(soo.add(1,2));
        System.out.println(soo.sub(1.0,2.0));
        Soo.staticMethod();
        System.out.println(soo.a);
    }
}
interface Soo {
    int a=1;
    int add(int x,int y);

    public static void staticMethod(){
        System.out.println("show()");
    }
    default double sub(double x,double y){
        return x-y;
    }
    private void show(){
        System.out.println("private修饰的私有的方法");
    }
    class SooImpl implements Soo{
        @Override
        public int add(int x,int y){
            return x+y;
        }
    }
}
